// 引入mockjs
const Mock = require('mockjs')

// 获取 mock.Random 对象
// const Random = Mock.Random

// mock一组数据
// const simulateData = function () {
//     let data = []
//     for (let i = 0; i < 8; i++) {
//         let data = {
//             name: Random.cname(),
//             date: Random.date(),
//             city: Random.city()
//         }
//         data.push(data)
//     }
//
//     return {
//         data: data
//     }
// }
//
// Mock.mock('/user/login', 'get', simulateData)

Mock.mock('/user/login','get',{
    'array|1-5':[
        {
            'string|1-10':'str',
            province:'@province',
            city:'@city',
            'id|+1':1,
            date:'@date("yyyy-mm-dd")'
        }
    ]
})

Mock.mock('/goodsList','get',{
    'array|10-15':[
        {
            "id|+1":1, title: '@ctitle(15, 30)', "price|40-400": 200, "payCount|200-5000": 1000,
            simpleTitle: '@ctitle(2, 5)',
            img: [
                require('@/assets/img/goodsList/goods_wan1.png'),
                require('@/assets/img/goodsList/goods_wan2.png'),
                require('@/assets/img/goodsList/goods_wan3.png'),
                require('@/assets/img/goodsList/goods_wan4.png'),
            ],
            mainImg: require('@/assets/img/goodsList/goods_wan1.png'), "tags|1-4": ['@csentence(4, 8)'],
            "params|5-20": [
                {title: '@ctitle(2, 6)',des:'@csentence(2, 20)'},
            ],
        },
    ]
})